<?php
/**
 * 充值打款银行记录
 * User: guojing
 * Date: 2020/4/10
 * Time: 0:03
 */

namespace app\api\model;

use think\Db;
use think\Model;

class RechargeOfflineBank extends Model
{

    protected $name = 'recharge_offline_bank';

    /**
     * 获取列表
     */
    public static function dataList($params = [])
    {
        $where = [];
        $page = '1, 20';
        if (isset($params['page']) && $params['page_size']) {
            $page = $params['page'] . ',' . $params['page_size'];
        }
        if (isset($params['uid'])) {
            $where['send_uid'] = $params['uid'];
        }
        $list = self::where($where)->page($page)->select();
        return $list ? $list : [];
    }

    public static function findInfoByCondition($condition = [])
    {
        return self::where($condition)->find();
    }

    public static function addRecord($addData = [])
    {
        $data = $addData;
        return self::create($data);
    }

}